package com.wxzz.elearing.comment.api.admin;


import com.wxzz.elearing.comment.dto.ActivityCommentDto;
import com.wxzz.elearing.comment.entity.ActivityComment;
import com.wxzz.elearing.comment.service.IActivityCommentService;
import com.wxzz.elearning.common.vo.JgPageVo;
import com.wxzz.elearning.common.vo.ReturnVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/activity-comment")
@Api(tags = "活动评论接口(后台)")
public class ActivityCommentController {


    @Autowired
    private IActivityCommentService activityCommentService;

    @Autowired
    private RedisTemplate<String, String> redisTemplate;

    @ApiOperation(value = "根据活动id列出所有评论(小程序)", notes = "根据活动id列出所有评论(小程序)", httpMethod = "POST", tags = "小程序")
    @RequestMapping(value = "listComment", method = RequestMethod.POST)
    public ReturnVO<JgPageVo<List<ActivityComment>>> listComment(@RequestBody ActivityCommentDto skillCommentDto) {
        return activityCommentService.listComment(skillCommentDto);
    }
}
